﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Forms;

namespace SARControlLib
{
	/// <summary>
	/// SARFileSelector.xaml 的交互逻辑
	/// </summary>
	public partial class SARFileSelector : System.Windows.Controls.UserControl
	{
		public SARFileSelector()
		{
			this.InitializeComponent();
		}

        public string SARFile
        {
            set
            {
                this.txtFileName.SARText = value;
                this.txtFileName.ToolTip = value;
            }
            get
            {
                return this.txtFileName.SARText;
            }
        }

        private void SARImageButton_SARClick(object sender, MouseButtonEventArgs e)
        {
            OpenFileDialog ofd = new OpenFileDialog();
            if (ofd.ShowDialog() == DialogResult.OK)
            {
                SARFile = ofd.FileName;
            }
        }
	}
}